// 通知管理类
class NotificationManager {
    constructor() {
        this.notification = {
            show: false,
            message: '',
            type: 'success'
        };
    }

    // 显示通知消息
    showMessage(message, type = 'success') {
        this.notification.message = message;
        this.notification.type = type;
        this.notification.show = true;

        // 3秒后自动隐藏
        setTimeout(() => {
            this.hideMessage();
        }, 3000);
    }

    // 隐藏通知消息
    hideMessage() {
        this.notification.show = false;
    }

    // 获取通知状态
    getNotification() {
        return this.notification;
    }
}

// 创建全局通知管理器实例
window.notificationManager = new NotificationManager(); 